// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 创建类别 POST /api/module/ToDo/Category */
export async function toDoCreateCategory(
  body: API.CategoryCreateInputModel,
  options?: { [key: string]: any },
) {
  return request<API.Result>('/api/module/ToDo/Category', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除分类 DELETE /api/module/ToDo/Category/${param0} */
export async function toDoDeleteCategory(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ToDoDeleteCategoryParams,
  options?: { [key: string]: any },
) {
  const { ids: param0, ...queryParams } = params;
  return request<API.Result>(`/api/module/ToDo/Category/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 用户事项类别 GET /api/module/ToDo/Customer/Category */
export async function toDoGetCustomerToDoItemCategory(options?: { [key: string]: any }) {
  return request<API.Result1List1CategoryOutputModel>('/api/module/ToDo/Customer/Category', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 修改待办 PUT /api/module/ToDo/Item */
export async function toDoUpdateToDoItem(
  body: API.ToDoItemUpdateInputModel,
  options?: { [key: string]: any },
) {
  return request<API.Result>('/api/module/ToDo/Item', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 创建事项 POST /api/module/ToDo/Item */
export async function toDoCreateToDoItem(
  body: API.ToDoItemCreateInputModel,
  options?: { [key: string]: any },
) {
  return request<API.Result>('/api/module/ToDo/Item', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 删除事项 DELETE /api/module/ToDo/Item/${param0} */
export async function toDoDeleteItem(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ToDoDeleteItemParams,
  options?: { [key: string]: any },
) {
  const { ids: param0, ...queryParams } = params;
  return request<API.Result>(`/api/module/ToDo/Item/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 删除关联分类 DELETE /api/module/ToDo/Item/${param0}/Category/${param1} */
export async function toDoDeleteItemCategory(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ToDoDeleteItemCategoryParams,
  options?: { [key: string]: any },
) {
  const { itemId: param0, categoryId: param1, ...queryParams } = params;
  return request<API.Result>(`/api/module/ToDo/Item/${param0}/Category/${param1}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 修改代办事项是否完成 PUT /api/module/ToDo/Item/Completed/${param0}/${param1} */
export async function toDoUpdateToDoItemCompleted(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ToDoUpdateToDoItemCompletedParams,
  options?: { [key: string]: any },
) {
  const { itemId: param0, isCompleted: param1, ...queryParams } = params;
  return request<API.Result>(`/api/module/ToDo/Item/Completed/${param0}/${param1}`, {
    method: 'PUT',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 修改代办事项等级 PUT /api/module/ToDo/Item/Priority/${param0}/${param1} */
export async function toDoUpdateToDoItemPriority(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ToDoUpdateToDoItemPriorityParams,
  options?: { [key: string]: any },
) {
  const { itemId: param0, priorityType: param1, ...queryParams } = params;
  return request<API.Result>(`/api/module/ToDo/Item/Priority/${param0}/${param1}`, {
    method: 'PUT',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 分页查询 GET /api/module/ToDo/Page */
export async function toDoPage(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ToDoPageParams,
  options?: { [key: string]: any },
) {
  return request<API.PageResult1ToDoItemOutputModel>('/api/module/ToDo/Page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
